package com.gexiaobao.pigeon.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.base.DataBindBaseViewHolder
import com.gexiaobao.pigeon.databinding.ItemEmotionsBinding

/**
 * @Author      : hxw
 * @Date        : 2024/2/29 9:45
 * @Describe    :
 */
class EmotionsAdapter(data: ArrayList<String>) : BaseQuickAdapter<String, DataBindBaseViewHolder>(R.layout.item_emotions, data) {
    override fun convert(holder: DataBindBaseViewHolder, item: String) {
        val binding = DataBindBaseViewHolder.getBinding(holder) as ItemEmotionsBinding
//        binding.data = item
        binding.executePendingBindings()//防止列表抖动
        holder.setText(R.id.tvEmotions, item)

    }
}